import { getRequest,postRequest, postDownload } from '/@/lib/axios';

// 定义 param 的类型
interface RequestParams {
    [key: string]: any;
}
interface HMIParams {
    [key: string]: any;
}
export const ActualPerformanceRollDeviationApi = {
    // 跑偏页面列表信息查询
    findByPage: (param:HMIParams) => {
        return postRequest('/eapi/strip/findByPage', param);
    },
    // 跑偏页面列表信息查询
    findBySql: (param:HMIParams) => {
        return postRequest('/eapi/universalFindSql/findBySql', param);
    },
    // 跑偏实绩详情接口
    querytheme: (param:HMIParams) => {
        return postRequest('/mongodb/mongodb_data/bensteel/querytheme', param);
    },
    // 纠偏设备精度诊断-均值/标准差接口
    history: (param:HMIParams) => {
        return postRequest('/eapi/continuous/history', param);
    },
    // 纠偏设备精度诊断-点图数据接口
    findCpcRoll: (param:HMIParams) => {
        return postRequest('/eapi/continuous/findCpcRoll', param);
    },
    // 钢种统计接口
    findHighestSteelGradeByDate: (param:HMIParams) => {
        return postRequest('/eapi/tbPaopianPdoData/findHighestSteelGradeByDate', param);
    },
    // 品规统计接口
    findHighestSpecificationsByDate: (param:HMIParams) => {
        return postRequest('/eapi/tbPaopianPdoData/findHighestSpecificationsByDate', param);
    },
    // 分卷优化列表接口
    coil_fullproc: (param:HMIParams) => {
        return postRequest('/eapi/coil_fullproc/page', param);
    },
    // 1870线全流程成材率表
    get_tbyieldtcm_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/get_tbyieldtcm_detais_page', param);
    },
    // 1630线全流程成材率表
    get_tbyieldcal1630_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/get_tbyieldcal1630_detais_page', param);
    },
    // 2150线全流程成材率表
    get_tbyieldcal2150_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/get_tbyieldcal2150_detais_page', param);
    },
    // 2280线全流程成材率表
    get_tbyieldtcm2280_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/get_tbyieldtcm2280_detais_page', param);
    },

    get_tbyieldrcl1870_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/rcl1870detais', param);
    },

    get_tbyieldrcl1630_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/rcl1630detais', param);
    },

    get_tbyieldrcl2150_detais: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/rcl2150detais', param);
    },
    // 镀锌实施工艺参数接口
    fetchData: () => {
        return postRequest('/eapi/processParam/fetchData', null);
    },
    // 全流程损失指标统计
    getCompleteFlowLossData: (param:HMIParams) => {
        return postRequest('/eapi/comlete/getCompleteFlowLossData', param);
    },
    // 全流程成材率分析统计
    getCompleteFlowData: (param:HMIParams) => {
        return postRequest('/eapi/comlete/getCompleteFlowData', param);
    },
    // 全流程成材率分析班组统计
    getCompleteFlowCrewData: (param:HMIParams) => {
        return postRequest('/eapi/comlete/getCompleteFlowCrewData', param);
    },
    // 全流程成材率模型主页
    get_allprocessindexdetails: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/indexdetails', param);
    },
    // 全流程成材率模型主页异常原因
    get_allprocessindexReason: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/indexReason', param);
    },
    // 全流程成材率模型主页产品分类
    get_allprocessproductDetail: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/productDetail', param);
    },

    // 全流程成材率模型主页产品分类
    get_allprocessproductReason: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/productReason', param);
    },

    // 全流程成材率模型主页机组计算成材率
    get_allprocessmachinedetails: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/machinedetails', param);
    },


    // 分卷优化列表接口
    export: (param:any) => {
        return postDownload('/eapi/coil_fullproc/export-by-template', param);
    },
    // 产品成材率全流程分析
    get_allprocessproduct: (param:HMIParams) => {
        return postRequest('/eapi/allprocess/get_allprocessproduct', param);
    },

    // updateAbnormalReason1870(param:any){
    //     return postRequest('/eapi/allprocess/updateAbnormalReason1870', param);
    // },

    // updateAbnormalReason1630(param:any){
    //     return postRequest('/eapi/allprocess/updateAbnormalReason1630', param);
    // },

    // updateAbnormalReason2150(param:any){
    //     return postRequest('/eapi/allprocess/updateAbnormalReason2150', param);
    // },

    // updateAbnormalReason2280(param:any){
    //     return postRequest('/eapi/allprocess/updateAbnormalReason2280', param);
    // },
    getCompleteFlowSpeciData(param:any){
        return postRequest('/eapi/comlete/getCompleteFlowSpeciData', param);
    },

    updateAbnormalReasonTcm2280 ( param: any ){ 
        return postRequest('/eapi/allprocess/updateAbnormalReason2280List', param);
    },

    updateAbnormalReasonCal1630 ( param: any ){ 
        return postRequest('/eapi/allprocess//updateAbnormalReason1630List', param);
    },

    updateAbnormalReasonCal2150 ( param: any ){ 
        return postRequest('/eapi/allprocess/updateAbnormalReason2150List', param);
    },

    updateAbnormalReasonCgl1870 ( param: any ){ 
        return postRequest('/eapi/allprocess/updateAbnormalReason1870List', param);
    },

    // ----- 导出 ---------
    export2280(param:any){
        return postDownload('/eapi/allprocess/export2280', param);
    },

    export1870(param:any){
        return postDownload('/eapi/allprocess/export1870', param);
    },

    export1630(param:any){
        return postDownload('/eapi/allprocess/export1630', param);
    },

    export2150(param:any){
        return postDownload('/eapi/allprocess/export2150', param);
    },

    // 全流程成材率模型主页质量缺陷
    getQualityDefect(param:any){
        return postRequest('/eapi/allprocessDefect/getDetailData', param);
    },

    // 质量缺陷明细
    getQualityDefectList(param:any){
        return postRequest('/eapi/allprocessDefect/getDetailDatalist', param);
    },
    
    // 生产实际跑偏列表导出
    exportXlsx(param:any){
        return postDownload('/eapi/strip/exportXlsx', param);
    },

    // 全流程成材率损失分析
    getLossAnalysis ( param: any ){ 
        return postRequest('/eapi/allprocess/indextable', param);
    },
};
